import { createApp } from 'vue'
// 引入全局样式
import '@/style/index.css'
// 引入饿了么组件
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as Icons from '@element-plus/icons'
// 引入全局状态管理
import { createPinia } from "pinia";
import App from './App.vue'
// 引入路由
import router from "@/router";
// 引入全局组件
import enrollComponents from '@/publicComponents/';

const app = createApp(App)
app.use(createPinia()).use(router).use(ElementPlus).use(enrollComponents).mount('#app')

// 注册全局组件,为了动态加载icon
Object.keys(Icons).forEach(key => {
  app.component(key, Icons[key as keyof typeof Icons])
})
